<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>  
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>添加用户</title>
	<script type="text/javascript">
	function addUser(){
		var form = document.forms[0];
		form.action = "<%=basePath%>user/addUser";
		form.method="post";
		form.submit();
	}
</script>

  </head>
  
  <body>
    <h1>添加用户</h1>
	<form action="" name="userForm">
		<table>
			<tbody>
				<tr>
					<td>用户名:</td>
					<td><input type="text" name="userName"></td>
				</tr>
				<tr>
					<td>密码:</td>
					<td><input type="text" name="passWord"></td>
				</tr>
				<tr>
					<td>状态:</td>
					<td><select name="state">
						<option value="1">正常</option>
						<option value="2">禁用</option>
					</select></td>
				</tr>
				<tr>
					<td colspan="2"><input type="button" value="添加" onclick="addUser()"></td>
				</tr>
			</tbody>
		</table>
	</form>
  </body>
</html>
